package org.desktop.web.client.role;

import java.util.Map;

import org.desktop.web.shared.Response;
import org.desktop.web.shared.domain.entities.Role;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.sencha.gxt.data.shared.loader.PagingLoadConfig;
import com.sencha.gxt.data.shared.loader.PagingLoadResult;


@RemoteServiceRelativePath("roleservice")
public interface RoleService extends RemoteService {

	
	public static final class ServiceFactory {
		
		public static RoleServiceAsync createService(){
			return GWT.create(RoleService.class);
		}
	}
	
	Response getRoles(String token) throws Exception;
	
	PagingLoadResult<Role> getRoles(String token, PagingLoadConfig loadConfig) throws Exception;
	
	boolean existsCodRole(Map<String,String> headers,String codRole) throws Exception;

	Response saveRole(Map<String, String> headers, Role role) throws Exception;

	Response deleteRole(Map<String, String> headers, Role selectedItem) throws Exception;
	
}
